import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqPlayerItemHelper } from "../Public/SeqPlayerItemHelper";
import { DictIntStrHelper } from "../Public/DictIntStrHelper";
import { SeqSPetSkillHelper } from "./SeqSPetSkillHelper";
import { SFightAttribute } from "../Public/SFightAttribute";
type int = number;
//class SPetInfo
    
    export  class SPetInfo extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        
        {
            SPetInfo._regist = new SPetInfo(true);
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SPetInfo();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.code);
            arg1.writeInt(this.changeCode);
            arg1.writeString(this.uid);
            arg1.writeString(this.name);
            arg1.writeString(this.typeName);
            arg1.writeInt(this.life);
            arg1.writeInt(this.mana);
            arg1.writeInt(this.level);
            arg1.writeLong(this.experience);
            arg1.writeInt(this.lifeSpan);
            arg1.writeInt(this.energy);
            arg1.writeInt(this.maxEnergy);
            arg1.writeInt(this.maxLifeSpan);
            arg1.writeInt(this.sex);
            arg1.writeInt(this.needLevel);
            arg1.writeInt(this.gene);
            arg1.writeInt(this.career);
            arg1.writeInt(this.growth);
            arg1.writeInt(this.spirit);
            arg1.writeInt(this.talent);
            arg1.writeInt(this.status);
            arg1.writeString(this.icon);
            arg1.writeInt(this.crit);
            arg1.writeInt(this.sireTime);
            arg1.writeInt(this.maxSkillAmount);
            arg1.writeInt(this.growthBless);
            arg1.writeInt(this.spiritBless);
            arg1.writeInt(this.totalTrainTime);
            arg1.writeInt(this.spiritSkillNum);
            arg1.writeInt(this.growthSkillNum);
            arg1.writeBool(this.isBorrow);
            arg1.writeString(this.ownerName);
            arg1.writeInt(this.modelLevel);
            arg1.writeInt(this.maxSpiritBlessLevel);
            arg1.writeInt(this.maxGrowthBlessLevel);
            this.fightAttribute.__write(arg1);
            SeqPlayerItemHelper.write(arg1, this.items);
            DictIntStrHelper.write(arg1, this.dictIntStr);
            SeqSPetSkillHelper.write(arg1, this.skills);
            arg1.writeInt(this.petId);
            arg1.writeInt(this.strengthenGrowth);
            arg1.writeInt(this.strengthenSpirit);
            arg1.writeInt(this.reinLevel);
            this.baseFightAttribute.__write(arg1);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.code = arg1.readInt();
            this.changeCode = arg1.readInt();
            this.uid = arg1.readString();
            this.name = arg1.readString();
            this.typeName = arg1.readString();
            this.life = arg1.readInt();
            this.mana = arg1.readInt();
            this.level = arg1.readInt();
            this.experience = arg1.readLong();
            this.lifeSpan = arg1.readInt();
            this.energy = arg1.readInt();
            this.maxEnergy = arg1.readInt();
            this.maxLifeSpan = arg1.readInt();
            this.sex = arg1.readInt();
            this.needLevel = arg1.readInt();
            this.gene = arg1.readInt();
            this.career = arg1.readInt();
            this.growth = arg1.readInt();
            this.spirit = arg1.readInt();
            this.talent = arg1.readInt();
            this.status = arg1.readInt();
            this.icon = arg1.readString();
            this.crit = arg1.readInt();
            this.sireTime = arg1.readInt();
            this.maxSkillAmount = arg1.readInt();
            this.growthBless = arg1.readInt();
            this.spiritBless = arg1.readInt();
            this.totalTrainTime = arg1.readInt();
            this.spiritSkillNum = arg1.readInt();
            this.growthSkillNum = arg1.readInt();
            this.isBorrow = arg1.readBool();
            this.ownerName = arg1.readString();
            this.modelLevel = arg1.readInt();
            this.maxSpiritBlessLevel = arg1.readInt();
            this.maxGrowthBlessLevel = arg1.readInt();
            this.fightAttribute = new SFightAttribute();
            this.fightAttribute.__read(arg1);
            this.items = SeqPlayerItemHelper.read(arg1);
            this.dictIntStr = DictIntStrHelper.read(arg1);
            this.skills = SeqSPetSkillHelper.read(arg1);
            this.petId = arg1.readInt();
            this.strengthenGrowth = arg1.readInt();
            this.strengthenSpirit = arg1.readInt();
            this.reinLevel = arg1.readInt();
            this.baseFightAttribute = new SFightAttribute();
            this.baseFightAttribute.__read(arg1);
            return;
        }

        public /* const */_type: int=12043;

        public /* var */mana: int;

        public /* var */level: int;

        public /* var */experience: number;

        public /* var */lifeSpan: int;

        public /* var */energy: int;

        public /* var */maxEnergy: int;

        public /* var */maxLifeSpan: int;

        public /* var */sex: int;

        public /* var */needLevel: int;

        public /* var */gene: int;

        public /* var */career: int;

        public /* var */growth: int;

        public /* var */spirit: int;

        public /* var */talent: int;

        public /* var */status: int;

        public /* var */icon: string;

        public /* var */crit: int;

        public /* var */sireTime: int;

        public /* var */maxSkillAmount: int;

        public /* var */life: int;

        public /* var */spiritBless: int;

        public /* var */totalTrainTime: int;

        public /* var */spiritSkillNum: int;

        public /* var */growthSkillNum: int;

        public /* var */isBorrow: Boolean;

        public /* var */ownerName: string;

        public /* var */modelLevel: int;

        public /* var */maxSpiritBlessLevel: int;

        public /* var */maxGrowthBlessLevel: int;

        public /* var */fightAttribute: SFightAttribute;

        public /* var */items: Array<any>;

        public /* var */dictIntStr: Map<any, any> /* flash.utils.Dictionary */;

        public /* var */code: int;

        public /* var */petId: int;

        public /* var */strengthenGrowth: int;

        public /* var */strengthenSpirit: int;

        public /* var */reinLevel: int;

        public /* var */baseFightAttribute: SFightAttribute;

        public /* var */growthBless: int;

        public /* var */changeCode: int;

        public /* var */uid: string;

        public /* var */name: string;

        public /* var */typeName: string;

        public static /* var */_regist: SPetInfo;

        public /* var */skills: Array<any>;
    }
